<template>
   <el-row class="tac" style="
   width: 100%;
    height: 0px;
    margin: 0px;
    padding: 0px;
    border: 0px;
    margin-left: auto;
    margin-top: 0px ;">
    <el-col :span="12">
      <el-menu default-active="1"  class="el-menu-vertical-demo"  @open="handleOpen"  @close="handleClose" >
        <div class="demo-type">
        <div style="background-color: #d8e4eb;">
          <el-avatar
            src="https://picb.zhimg.com/v2-eb4986c19f834ba9cf523bc33bf5432a_r.jpg"
          />
        </div>
        </div>

        <el-menu-item index="1" style="background-color: #d8e4eb;margin-left: -18px;">
          <el-icon><icon-menu /></el-icon>
          <span style="font-size: 20px; margin-left: -11px;" @click.stop="getHome"><el-icon><House/></el-icon>
            {{$t('top.home')}}
          </span>
        </el-menu-item>
        <el-sub-menu index="2" style="background-color: #d8e4eb;margin-left: -18px;">
          <template #title>
            <el-icon><location /></el-icon>
            <span style="font-size: 20px; margin-left: -11px;"><el-icon><UserFilled /></el-icon>{{$t('top.user')}}</span>
          </template>
            <el-menu-item  class="btn" index="1-1" style="background-color: #d8e4eb;" @click="getStudent"><el-icon><User/></el-icon>{{$t('top.student')}}</el-menu-item>
            <el-menu-item class="btn"  index="1-2" style="background-color: #d8e4eb;" @click="getTeacher"><el-icon><User/></el-icon>{{$t('top.teacher')}}</el-menu-item>
        </el-sub-menu>
        <el-menu-item index="3" style="background-color: #d8e4eb;margin-left: -18px;">
          <el-icon><icon-menu /></el-icon>
          <span style="font-size: 20px; margin-left: -11px;" @click="getClass" ><el-icon><School /></el-icon>{{$t('top.class')}}</span>
        </el-menu-item>
        <el-menu-item index="4" style="background-color: #d8e4eb;margin-left: -18px;">
          <el-icon><setting /></el-icon>
          <span style="font-size: 20px; margin-left: -11px;" @click="getCourse " ><el-icon><Reading /></el-icon>{{$t('top.course')}}</span>
        </el-menu-item>
      </el-menu>
    </el-col>
   </el-row>
</template>
<script>
import {House,User,UserFilled,School,Reading} from '@element-plus/icons-vue';
   export default {
     name: '',
     components:{
      House,School,User,UserFilled,Reading
    },
     data: function(){
       return {
       }
     },
     methods:{
      getStudent(){
        this.$router.push({
                  name:"student",
                  });
      },
      getTeacher(){
        this.$router.push({
                  name:"teacher",
                  });
      },
      getClass(){
        this.$router.push({
                  name:"userclass",
                  });
      },
      getHome(){
        this.$router.push({
                  name:"department",
                  });
      },
      getCourse(){
        this.$router.push({
                  name:"usercourse",
                  });
      },
      }
     }
</script>
<style>

.el-menu-vertical-demo{
  width: 183px;
  height: 168px;
  border-right: 0px !important;
}
.btn{
  /* background-color: #CCEEFF; */
  font-size: 15px !important;
}
.demo-type {
  display: flex;
  margin-left: -125px;
}
.demo-type > div {
  margin-left: 30px;
  flex: 1;
  text-align: center;
}

.demo-type > div:not(:last-child) {
  border-right: 1px solid var(--el-border-color);
}


</style>